package annotation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

/*
service:Model
view:v
controller:c


 */



//@Component
@Service
public class UserService {


    //使用注解开发，那么依赖的属性如何注入呢？
    @Autowired  //自动装配，但是要提供set/get方法
     UserDao userDao;


    public void say() {
        userDao.hello_anno();
    }

    public UserDao getUserDao() {
        return userDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

}
